package com.aos.erp.manager.model.notice;

import com.aos.erp.manager.enums.DelStatus;
import com.aos.erp.manager.enums.NoticeType;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("通知公告")
@TableName("t_notice")
public class NoticeInfo {
    @ApiModelProperty(value="公告ID",hidden=true)
    @TableId(value = "id", type = IdType.INPUT)
    private long id;

    @ApiModelProperty("公告类型：notice为公告；msg为消息")
    @TableField("notice_type")
    private NoticeType noticeType = NoticeType.notice;

    @ApiModelProperty("是否删除：del_no为未删除；del_yes为已删除")
    @TableField("is_del")
    private DelStatus isDel = DelStatus.del_no;

    @ApiModelProperty("公告标题, 100字符内")
    @TableField("n_title")
    private String noticeTitle;

    @ApiModelProperty("公告内容：5000字符内")
    @TableField("n_content")
    private String noticeContent;

    @ApiModelProperty(value = "弹窗提示开始时间",hidden=true)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("tips_start_time")
    private Date tipsStartTime;

    @ApiModelProperty(value = "弹窗提示截止时间",hidden=true)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("tips_end_time")
    private Date tipsEndTime;

    @ApiModelProperty("创建人")
    @TableField("create_user")
    private String createUser;

    @ApiModelProperty(value = "创建时间",hidden=true)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty("修改人")
    @TableField("update_user")
    private String updateUser;

    @ApiModelProperty(value = "修改时间",hidden=true)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("update_time")
    private Date updateTime;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public NoticeType getNoticeType() {
        return noticeType;
    }

    public String getNoticeTypeName() {
        return noticeType.getDesc();
    }

    public void setNoticeType(NoticeType noticeType) {
        this.noticeType = noticeType;
    }

    public DelStatus getIsDel() {
        return isDel;
    }

    public String getIsDelName() {
        return isDel.getDesc();
    }

    public void setIsDel(DelStatus isDel) {
        this.isDel = isDel;
    }

    public String getNoticeTitle() {
        return noticeTitle;
    }

    public void setNoticeTitle(String noticeTitle) {
        this.noticeTitle = noticeTitle;
    }

    public String getNoticeContent() {
        return noticeContent;
    }

    public void setNoticeContent(String noticeContent) {
        this.noticeContent = noticeContent;
    }

    public Date getTipsStartTime() {
        return tipsStartTime;
    }

    public void setTipsStartTime(Date tipsStartTime) {
        this.tipsStartTime = tipsStartTime;
    }

    public Date getTipsEndTime() {
        return tipsEndTime;
    }

    public void setTipsEndTime(Date tipsEndTime) {
        this.tipsEndTime = tipsEndTime;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
